{% extends "announcements/announcements.html" %}

{% block page_link %}
    <script src="../../static/announcements/js/detail.js"></script>
    <link rel="stylesheet" href="../../static/system_setup/css/zTreeStyle/zTreeStyle.css">
    <link rel="stylesheet" href="../../static/announcements/css/style.css">
    <link rel="stylesheet" href="../../static/system_setup/css/style.css">
    <script src="../../static/public_file/js/wangEditor.min.js" type="text/javascript" charset="UTF-8"></script>
{% endblock %}


{% block style %}
    <style>
        .add_class{
            background: #1E90FF;
        }
    </style>
{% endblock %}


{% block right_content %}
    <div class="headline">
        <div style="width: 15%;height: 100%;line-height: 40px;float: left;padding-left: 1%;">
            <a href="{{ a_href }}" style="color: #0b0b0b;">
                <i class="iconfont icon-yulan"></i>
                <span> 新闻预览</span>
            </a>
        </div>
    </div>

    <div class="right-box" style="width: 100%;height: 93%;padding: 0 30px 0 15px;overflow: auto;">
        <div style="background: white;box-shadow: 1px -1px 2px 1px #CFCFCF;padding: 3%;margin: 3%;">
            <h3 style="width: 100%;text-align: center;" id="news_title"></h3>
            <p style="width: 100%;text-align: center;">发布时间：<span id="push_time"></span></p>
            <div style="margin-top: 3%;" id="content_text">

            </div>

            <div style="width: 100%;border: #E8E8E8 solid 1px;margin-top: 2%;"></div>

            <div style="margin-top: 1%;width: 100%;">
                <p style="margin-top: 1%;">附件：</p>
                {% for foo in file_list %}
                    <p style="margin-top: 1%;"><a href="{{ foo.file_path }}">{{ foo.file_name }}</a></p>
                {% endfor %}

            </div>
        </div>
    </div>
{% endblock %}




{% block script %}
    <script>
        document.getElementById("news-administration").className = "add_class";
        var news_name = window.opener.document.getElementById("news-name").value;         // 新闻名称
        document.getElementById("news_title").innerHTML = news_name;
        var push_time = window.opener.document.getElementById("notice-date").value;                //新闻日期
        document.getElementById("push_time").innerHTML = push_time;
        var content_text = window.opener.editor.txt.html();
        document.getElementById("content_text").innerHTML = content_text;
    </script>
{% endblock %}
